
<extend name="Public:common"/>
<block name="main">

    <form class="am-form am-form-horizontal" method="post" data-am-validator="H5validation:false">
        <fieldset>
            <legend>编辑</legend>
                <div class="am-input-group">
                    <span class="am-input-group-label"><b>金额</b></span>
                    <input type="number" class="am-form-field" id="text-money" name="edit_money" step=0.01 value="{$ShowData.money}">
                    <p></p>
                </div>
                <div><p></p></div>
                <div class="am-input-group">
                    <span class="am-input-group-label"><b>类别</b></span>
                    <select id="select-type" class="am-form-field" name="edit_type" onchange="ChangClass({$MoneyClass},'select-type','select-class')">
                        <if condition="$ShowData['type'] eq '收入'">
                            <option value="1">收入</option>
                            <option value="2">支出</option>
                        <else/>
                            <option value="2">支出</option>
                            <option value="1">收入</option>
                        </if>
                    </select>
                </div>
                <div><p></p></div>
                <div class="am-input-group">
                    <span class="am-input-group-label"><b>分类</b></span>
                    <select id="select-class" class="am-form-field" name="edit_class">
                    <option value="{$ShowData.classid}">{$ShowData.class}</option>
                    <foreach name="DbClass" item="ClassName">
                        <if condition="$key neq $ShowData['classid']">
                            <option value="{$key}">{$ClassName}</option>
                        </if>
                    </foreach>
                    </select>
                    <span class="am-form-caret"></span>
                </div>
                <div><p></p></div>
                <div class="am-input-group">
                    <span class="am-input-group-label"><b>备注</b></span>
                    <input type="text" class="am-form-field" id="text-mark" name="edit_mark" value="{$ShowData.mark}">
                </div>
                <div><p></p></div>
                <div class="am-input-group">
                    <span class="am-input-group-label"><b>时间</b></span>
                    <input type="date" class="am-form-field" id="text-time" name="edit_time" 
                            value="<php>echo date("Y-m-d",$ShowData['time']);</php>" />
                </div>
                <p><hr data-am-widget="divider" style="" class="am-divider am-divider-dashed" /></p>
                <p><input type="submit" class="am-btn am-btn-secondary am-btn-block" name="edit_submit" value="修改"></p>
                
                <p><a href="javascript:void(0);" class="am-btn am-btn-block am-btn-danger" 
                    onclick="isDelete('__APP__/Home/Edit/del/id/{$ShowData['id']}')" >删除</a></p>
                
                <p><a href="{$refURL}" class="am-btn am-btn-block am-btn-default">返回</a></p>
                
        </fieldset>
    </form>
</block>

